package com.itcast.monkey.service.base.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.itcast.monkey.dao.base.AreaRepository;
import com.itcast.monkey.domain.base.Area;
import com.itcast.monkey.service.base.AreaService;
@Service
@Transactional
public class AreaServiceImpl implements AreaService {

	@Autowired
	private AreaRepository areaRepository;
	
	@Override
	public void save(List<Area> arealist) {
		areaRepository.save(arealist);
	}

	@Override
	public Page<Area> findAll(Specification<Area> spercification, Pageable pageable) {
		return  areaRepository.findAll(spercification, pageable);
	}

}
